import { useRoutes } from "react-router-dom";
import React from 'react'
import Login from '../pages/login/login';
import News from '../pages/news/news';
import NotFound from '../components/notfound/notfound';
import About from '../pages/about/about';
import Joinus from '../pages/about/joinus';
import Contact from '../pages/about/contact';

const GetRouters = () => {
  return useRoutes([
    {
      path: "/",
      element: <Login />,
    },
    {
      path: "/login",
      element: <Login />,
    },
    {
        path: "/news/*",
        element: <News />
    },
    {
        path: "/about",
        element: <About />,
        children: [
            {
                index: true,
                path: "joinus",
                element: <Joinus />
            },
            {
                path: "contact",
                element: <Contact />
            }
        ]
    },
    {
      path: "*",
      element: <NotFound />
    }
    ]);
}
export default GetRouters;